home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / sun / font / FileFont.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.9 KB  |  70 lines

  1. package sun.font;
  2.  
  3. import java.awt.FontFormatException;
  4. import java.awt.geom.GeneralPath;
  5. import java.awt.geom.Point2D;
  6. import java.awt.geom.Rectangle2D;
  7. import java.io.File;
  8. import java.nio.ByteBuffer;
  9. import sun.java2d.Disposer;
  10.  
  11. public abstract class FileFont extends PhysicalFont {
  12.    protected boolean useJavaRasterizer = true;
  13.    protected int fileSize;
  14.    protected FileFontDisposer disposer;
  15.    protected long pScaler;
  16.    protected boolean checkedNatives;
  17.    protected boolean useNatives;
  18.    protected NativeFont[] nativeFonts;
  19.    protected char[] glyphToCharMap;
  20.  
  21.    FileFont(String var1, Object var2) throws FontFormatException {
  22.       super(var1, var2);
  23.    }
  24.  
  25.    FontStrike createStrike(FontStrikeDesc var1) {
  26.       if (!this.checkedNatives) {
  27.          this.checkUseNatives();
  28.       }
  29.  
  30.       return new FileFontStrike(this, var1);
  31.    }
  32.  
  33.    protected boolean checkUseNatives() {
  34.       this.checkedNatives = true;
  35.       return this.useNatives;
  36.    }
  37.  
  38.    protected abstract void close();
  39.  
  40.    abstract ByteBuffer readBlock(int var1, int var2);
  41.  
  42.    public boolean canDoStyle(int var1) {
  43.       return true;
  44.    }
  45.  
  46.    void setFileToRemove(File var1) {
  47.       Disposer.addObjectRecord(this, new CreatedFontFileDisposerRecord(var1, (1)null));
  48.    }
  49.  
  50.    static native void freeScaler(long var0);
  51.  
  52.    static synchronized native long getNullScaler();
  53.  
  54.    synchronized native StrikeMetrics getFontMetrics(long var1);
  55.  
  56.    synchronized native float getGlyphAdvance(long var1, int var3);
  57.  
  58.    synchronized native void getGlyphMetrics(long var1, int var3, Point2D.Float var4);
  59.  
  60.    synchronized native long getGlyphImage(long var1, int var3);
  61.  
  62.    synchronized native Rectangle2D.Float getGlyphOutlineBounds(long var1, int var3);
  63.  
  64.    synchronized native GeneralPath getGlyphOutline(long var1, int var3, float var4, float var5);
  65.  
  66.    synchronized native GeneralPath getGlyphVectorOutline(long var1, int[] var3, int var4, float var5, float var6);
  67.  
  68.    protected abstract long getScaler();
  69. }
  70.